package com.hoshiicloud.common.constant;

/**
 * 支付订单类型
 * 1-消费 2-退款
 */
public enum  PayOrderTypeEnum {

    CONSUME(1, "消费"),
    REFUND(2, "退款");

    private int code;

    private String name;

    PayOrderTypeEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static PayOrderTypeEnum get(int code) {
        for (PayOrderTypeEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus;
            }
        }
        return null;
    }
}
